package com.atguigu.demo;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * Created by Smexy on 2022/10/11
 */
public class StreamAPI
{
    public static void main(String[] args) {

        Stream<Integer> stream = Stream.of(1, 2, 3);

        List<Integer> list = Arrays.asList(1, 2, 3);
        Stream<Integer> s2 = list.stream();

        Stream<Integer> s3 = s2.map(num -> num + 10);

        List<Integer> result = s3.collect(Collectors.toList());

        System.out.println(result);
    }
}
